<?php 
class MsgInfoController extends AppController{
	var $name = 'MsgInfo';
	var $uses = array('MsgInfo');



	function msginfo() {
       $company_id = $this->rdAuth->id;
       //lfx modified 2013-09-23 start -->
       $data = $this->MsgInfo->findAll("display_obj_m = '1' and deleted is null and cn_asia<>'1' order by created desc",null,null,$this->show,$this->page);
       //lfx modified 2013-09-23 end -->
       $count=$this->MsgInfo->findCount("display_obj_m = '1' and deleted is null ");
    
      
       $this->set('data',$data);
       $pagestr=$this->initPageCount($count,'件','件','中',$this->show);
       $this->set("pagestr",$pagestr);
       //echo $count;
       $this->setPaging('ajax','/msgInfo/msginfo',$count,$this->show,null,$this->show);
       //$this->setPaging('ajax','/msgInfo/msginfo',$count);
	   $this->render('msginfo');

	}
	
	function msginfo_detail ($id=null,$params=null){
		if(!is_numeric($id)) { 	//対SQLインジェクション対策　ツバサ　2012-04-26
			$this->redirect('/errors/error404');
			exit;
		}
	   $data =	$this->MsgInfo->find("deleted is null and id=".$id);
	   if($params == "top") {
	   	$this->set('top',1);
	   }
	   $this->set('data',$data);
	}
	
}
?>
